package com.qyhl.party.party.test.challenge;

import com.qyhl.webtv.commonlib.entity.party.PartyChallengeBean;
import com.qyhl.webtv.commonlib.entity.party.PartyLoginBean;

public class PartyChallengePresenter implements PartyChallengeContract.PartyChallengePresenter {
    private PartyChallengeContract.PartyChallengeView mView;
    private PartyChallengeModel mModel;

    public PartyChallengePresenter(PartyChallengeContract.PartyChallengeView mView) {
        this.mView = mView;
        this.mModel = new PartyChallengeModel(this);
    }

    @Override
    public void startChallenge(String token) {
        mModel.startChallenge(token);
    }

    @Override
    public void submit(String token, int recordId, int questionId, String answer, int seconds) {
        mModel.submit(token, recordId, questionId, answer, seconds);
    }

    @Override
    public void submitTimeOut(String token, int recordId) {
        mModel.submitTimeOut(token, recordId);
    }

    @Override
    public void isLogin() {
        mModel.isLogin();
    }

    @Override
    public void startSuccess(PartyChallengeBean bean) {
        mView.startSuccess(bean);
    }

    @Override
    public void startError(String msg) {
        mView.startError(msg);
    }

    @Override
    public void submitSuccess(PartyChallengeBean bean) {
        mView.submitSuccess(bean);
    }

    @Override
    public void submitError(String msg) {
        mView.submitError(msg);
    }

    @Override
    public void timeOutSuccess(PartyChallengeBean bean) {
        mView.timeOutSuccess(bean);
    }

    @Override
    public void timeOutError(String msg) {
        mView.timeOutError(msg);
    }

    @Override
    public void LoginSuccess(PartyLoginBean bean) {
        mView.LoginSuccess(bean);
    }

    @Override
    public void LoginError(String msg) {
        mView.LoginError(msg);
    }
}
